package forumTransform.forumTransformID;
import java.io.Serializable;

public class Utterance implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8815800293766641424L;

	public Utterance() {
		super();
	}

	//unique id
	private double id;
	
	private double postId;
	
	private String postAuthorId;
	
	private String msgId;

	public String getMsgId() {
		return msgId;
	}

	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}

	// id of referenced utterance
	private String refMsgId;
	
	private double refId;

	private String userId;

	// id of participant to whom he is speaking
	private String refUserId;
	
	public String getRefUserId() {
		if(refUserId!=null)
			return refUserId.trim().replaceAll(" ", "_");
		return null;
	}

	public void setRefUserId(String refUserId) {
		this.refUserId = refUserId;
	}

	private String subject;

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	private String text = "";
	
	private String utteranceTime;
	
	private Integer level;

	private String topicId;
	
	public String getTopicId() {
		return topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public double getId() {
		return id;
	}
	public void setId(double id) {
		this.id = id;
	}


	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getUtteranceTime() {
		return utteranceTime;
	}
	public void setUtteranceTime(String utteranceTime) {
		this.utteranceTime = utteranceTime;
	}


	public String getRefMsgId() {
		return refMsgId;
	}

	public void setRefMsgId(String refMsgId) {
		this.refMsgId = refMsgId;
	}

	public double getRefId() {
		return refId;
	}

	public void setRefId(double refId) {
		this.refId = refId;
	}

	public String getUserId() {
		return userId.trim().replaceAll(" ", "_");
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Utterance(double id, String topicId) {
		super();
		this.id 		= id;
		this.topicId 	= topicId;
	}

	public Utterance(double id, double refId, String userId, String refUserId, String utteranceTime, String topicId) {
		super();
		this.id = id;
		this.refId = refId;
		this.userId = userId;
		this.utteranceTime = utteranceTime;
		this.topicId = topicId;
		this.refUserId = refUserId;
	}

	public double getPostId() {
		return postId;
	}

	public void setPostId(double postId) {
		this.postId = postId;
	}

	public String getPostAuthorId() {
		return postAuthorId;
	}

	public void setPostAuthorId(String postAuthorId) {
		this.postAuthorId = postAuthorId;
	}
	
	
	
}
